<?php
namespace App\Http\Controllers\Login;
use App\Http\Controllers\ApiBaseController;
use Illuminate\Http\Request;
use App\Models\AdminModels\Admin;
use App\Models\OrderModels\Order;
class PersonalAjaxController extends ApiBaseController {
	public function __construct(Request $request) {
		parent::__construct($request);
	}
	
	
	//个人中心资料修改
	public function infoSave(){
		$admin_id=session('user')[0]['admin_id'];
		// exit(print_r($this->params));
		if(isset($this->params['nick_name'])&&isset($this->params['real_name'])&&isset($this->params['head_img'])&&
		isset($this->params['sex'])&&isset($this->params['cp_name'])&&isset($this->params['cp_address'])&&isset($this->params['cp_industry'])&&
		isset($this->params['mobile'])&&isset($this->params['cp_mail'])){
			$data=array(
				'nick_name'=>$this->params['nick_name'],
				'real_name'=>$this->params['real_name'],
				'head_img'=>$this->params['head_img'],
				'sex'=>$this->params['sex'],
				'cp_name'=>$this->params['cp_name'],
				'cp_address'=>$this->params['cp_address'],
				'cp_industry'=>$this->params['cp_industry'],
				'mobile'=>$this->params['mobile'],
				'cp_mail'=>$this->params['cp_mail']
			);
			$dbdatebase=new Admin();
			$resout=$dbdatebase->db_update('',$admin_id,$data);
		}else{
			$this->code = 1;
			$this->msg = '缺少数据';
		}
		$this->boot();
	}
	
	
	
}